package com.woniuxy.service.impl;

import com.woniuxy.dao.ManagerDao;
import com.woniuxy.entity.Game;
import com.woniuxy.service.ManagerService;

import java.util.List;

public class ManagerServiceCgLibImpl implements ManagerService {
    private ManagerDao managerDao;
    public void setManagerDao(ManagerDao managerDao) {
        this.managerDao = managerDao;
    }
    public List<Game> findAll() {
        return managerDao.findAll();
    }

    @Override
    public int selectCount() {
        return managerDao.selectCount();
    }

    @Override
    public boolean insertGame(Game game) {
        if(managerDao.insertGame(game)){
            return true;
        }
        return false;
    }

    @Override
    public boolean delete(int id) {
        if(managerDao.delete(id)){
            return true;
        }
        return false;
    }

    @Override
    public int gameUpdate(Game game) {
        return managerDao.gameUpdate(game);
    }
}
